int value from enum in C#

51

int value from enum in C# -

public enum Question
{
    Role = 2,
    ProjectFunding = 3,
    TotalEmployee = 4,
    NumberOfServers = 5,
    TopBusinessConcern = 6
}

int something = (int) Question.Role;

Comments

Submit
0 Comments